home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 22
/
Amiga Format AFCD22 (Jan 1998, Issue 106).iso
/
-seriously_amiga-
/
shareware
/
workbench
/
-dopus-
/
pch56x
/
opus_patch56x-562
< prev
next >
Wrap
Text File
|
1997-11-05
|
7KB
|
253 lines
; Opus_Patch56x-562
; Installer script to update Directory Opus Magellan version 5.61 to 5.62
;
; Directory Opus Update Version $VER: Opus_Patch56x-562 (23.07.97)
; script version 2 fix problem with disk info module and storage dir
; script version 3 make one combined patch for WoA and 5.61 versions
; script version 4 added @default_dest for Neil annd Thomas
; COPYRIGHT ©1997 GP SOFTWARE, AUSTRALIA
(complete 0)
(procedure clear_assigns
(makeassign "DOPNEW")
(makeassign "PCH")
(makeassign "DOPOLD")
)
(procedure signal_opus
(set #Sigs (tackon #SRC "dopusmsg"))
(if (exists #Sigs (noreq))
(run (cat #Sigs " DOPUS.1 \"command set notify off\""))
)
)
(procedure make_newfiles ; (#EXT) requires #EXT to be set before call
(working "Updating modules/ftp.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/ftp.module -pPCH:ftp."#EXT" DOPOLD:modules/ftp.module"))
(working "Updating modules/configopus.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/configopus.module -pPCH:configopus."#EXT" DOPOLD:modules/configopus.module"))
(working "Updating modules/cleanup.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/cleanup.module -pPCH:cleanup."#EXT" DOPOLD:modules/cleanup.module"))
(working "Updating modules/about.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/about.module -pPCH:about."#EXT" DOPOLD:modules/about.module"))
(working "Updating modules/show.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/show.module -pPCH:show."#EXT" DOPOLD:modules/show.module"))
(working "Updating modules/read.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/read.module -pPCH:read."#EXT" DOPOLD:modules/read.module"))
(working "Updating modules/print.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/print.module -pPCH:print."#EXT" DOPOLD:modules/print.module"))
(working "Updating modules/play.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/play.module -pPCH:play."#EXT" DOPOLD:modules/play.module"))
(working "Updating modules/misc.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/misc.module -pPCH:misc."#EXT" DOPOLD:modules/misc.module"))
(working "Updating modules/listerformat.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/listerformat.module -pPCH:listerformat."#EXT" DOPOLD:modules/listerformat.module"))
(working "Updating modules/join.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/join.module -pPCH:join."#EXT" DOPOLD:modules/join.module"))
(working "Updating modules/icon.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/icon.module -pPCH:icon."#EXT" DOPOLD:modules/icon.module"))
(working "Updating modules/format.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/format.module -pPCH:format."#EXT" DOPOLD:modules/format.module"))
(working "Updating modules/filetype.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/filetype.module -pPCH:filetype."#EXT" DOPOLD:modules/filetype.module"))
(working "Updating modules/diskcopy.module")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:modules/diskcopy.module -pPCH:diskcopy."#EXT" DOPOLD:modules/diskcopy.module"))
(working "Updating libs/dopus5.library")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:libs/dopus5.library -pPCH:dopuslib."#EXT" DOPOLD:libs/dopus5.library"))
(working "Updating help/DOpus5.guide")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:help/DOpus5.guide -pPCH:helpguide."#EXT" DOPOLD:help/DOpus5.guide"))
(working "Updating DirectoryOpus")
(run (cat (tackon #SRC "spatch") " -oDOPNEW:DirectoryOpus -pPCH:dopus."#EXT" DOPOLD:DirectoryOpus"))
(copyfiles (source (cat "PCH:loaddb." #EXT)) (dest "DOPNEW:c") (newname "LoadDB"))
(copyfiles (source (cat "PCH:DOpusRT5." #EXT)) (dest "DOPNEW:c") (newname "DOpusRT5"))
(copyfiles (source (cat "PCH:diskinfo." #EXT)) (dest "DOPNEW:modules") (newname "diskinfo.module"))
(copyfiles (source (cat "PCH:update." #EXT)) (dest "DOPNEW:modules") (newname "update.module"))
)
(procedure wrong_version
(message #Title_msg
"Sorry, you have the wrong version of DirectoryOpus.\n\n"
"This upgrade will NOT WORK for your version.\n"
#README
"Your Opus version is "#dop_ver"."#dop_rev".\n"
"and the library is "#lib_ver"."#lib_rev"\n")
(exit "Installation terminated!")
)
(procedure anyone_home
(message #Title_msg
"Sorry, cannot find DirectoryOpus on you system!\n\n"
#README)
(exit "Installation terminated!")
)
(procedure wrong_dopus
(message #Title_msg
"Sorry, you have the wrong version of DirectoryOpus.\n\n"
"This upgrade will NOT WORK for your version.\n\n"
#README
"Your Opus version is "#dop_ver"."#dop_rev".\n")
(exit "Instalation terminated!")
)
(procedure get_ext
; work out which library version, should be enough
;
(set #lib_ver 0)
(if (exists #DOPUSLIB (noreq))
(
(set #Vernum (getversion #DOPUSLIB))
(set #lib_ver (/ #Vernum 65536))
(set #lib_rev (- #Vernum (* #lib_ver 65536) ) )
(if (AND (= #lib_ver 60 ) (= #lib_rev 1 ))
(
(set #EXT "pch60")
(set #PATCHNAME "Opus6062Patch.lha")
)
(; else
(if (AND (= #lib_ver 61 ) (= #lib_rev 1 ))
(
(set #EXT "pch61")
(set #PATCHNAME "Opus6162Patch.lha")
)
)
)
)
)
(anyone_home)
)
(if (= #lib_ver 0)
(wrong_version)
)
)
;
; start
;
(
(onerror clear_assigns)
(set #OLD_OPUS "DOpus5:")
(set #FINAL "DOpus5:")
(set @default-dest #FINAL)
(set #NEW_OPUS "ram:OP562")
(set #PCH_TMP "ram:OPPCHTMP")
(set #SRC "ram:PCH56x")
(set #WANTVER 61)
(set #DOPUSPROG (tackon #OLD_OPUS "DirectoryOpus"))
(set #DOPUSLIB (tackon #OLD_OPUS "libs/dopus5.library"))
(set #README "Please read the ReadMe acompanying this archive or contact GPSoftware for details of upgrades\n\n")
(clear_assigns)
(signal_opus)
(makeassign "DOPOLD" #OLD_OPUS)
(makedir #NEW_OPUS)
(makeassign "DOPNEW" #NEW_OPUS)
(makedir "DOPNEW:modules")
(makedir "DOPNEW:c")
(makedir "DOPNEW:help")
(makedir "DOPNEW:libs")
(makedir #PCH_TMP)
(makeassign "PCH" #PCH_TMP)
; main procedure
(set #Title_msg "Directory Opus Magellan Update Patch.\n\n")
(message #Title_msg
"This procedure will update your existing version of"
" Directory Opus Magellan 5.6x to version 5.62.\n\n"
"When finished, you will need to reboot your Amiga."
)
(if (exists #DOPUSPROG (noreq))
(
(set #Vernum (getversion #DOPUSPROG))
(set #Dop_ver (/ #Vernum 65536))
(set #Dop_rev (- #Vernum (* #Dop_ver 65536) ) )
);else
(anyone_home)
)
(if (AND (= #dop_ver 5 ) (= #dop_rev #WANTVER ))
(get_ext)
(wrong_dopus) ;else
)
(if (exists (tackon #SRC #PATCHNAME))
(
(working "Unarchiving patch files...")
(run (cat (tackon #SRC "lhex") " >NIL: <NIL: -qfw=PCH: x " (tackon #SRC #PATCHNAME)))
(make_newfiles)
(copyfiles (source "DOPNEW:") (dest #FINAL) (all) (optional force))
(copyfiles (source (tackon #SRC "ReadMe_Magellan562")) (dest #FINAL) (infos))
;
; tidyup
;
(clear_assigns)
(run (cat "C:Delete " #PCH_TMP " all"))
(run (cat "C:Delete " #NEW_OPUS " all"))
; make sure update module is re-initialised
(run "C:Delete DOpus5:system/update-history FORCE")
); else
(message #Title_msg
"Woops! Cannot find the patch archive\n"
"Required archive: "#PATCHNAME".\n\n"
)
)
(clear_assigns)
)